# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=kamoso
pkgver=22.04.3
pkgrel=0
# armhf blocked by extra-cmake-modules
# s390x and riscv64 blocked by polkit -> kio
# ppc64le blocked by qt5-qtwebengine -> purpose
arch="all !armhf !s390x !riscv64 !ppc64le"
url="https://kde.org/applications/multimedia/org.kde.kamoso"
pkgdesc="An application to take pictures and videos out of your webcam"
license="GPL-2.0-or-later AND LGPL-2.1-only"
depends="
	gst-plugins-bad
	gst-plugins-good
	kirigami2
	qt5-qtquickcontrols2
	"
makedepends="
	extra-cmake-modules
	glib-dev
	gobject-introspection-dev
	gst-plugins-base-dev
	gstreamer-dev
	kconfig-dev
	kdoctools-dev
	ki18n-dev
	kio-dev
	knotifications-dev
	purpose-dev
	qt5-qtbase-dev
	samurai
	"
source="https://download.kde.org/stable/release-service/$pkgver/src/kamoso-$pkgver.tar.xz"
subpackages="$pkgname-doc $pkgname-lang"
options="!check" # Broken

build() {
	cmake -B build -G Ninja \
		-DCMAKE_BUILD_TYPE=RelWithDebInfo \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib
	cmake --build build
}

check() {
	cd build
	CTEST_OUTPUT_ON_FAILURE=TRUE ctest
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}

sha512sums="
379ec6050c273aed255c004e9c3a8463f6a1349d96cf83cd25b3172b1b4e45841d26a03ffb6c041ece85593e276593e65cf385643391615c9695e1a92010d3f1  kamoso-22.04.3.tar.xz
"
